using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace App
{
    internal class Common
    {
        internal static ColorScheme Theme = ColorScheme.Blue;
        internal static Color Color = SystemColors.Control;
        internal enum ColorScheme { Blue, Gray, Custom }

        internal static Color Blue = Color.FromArgb(191, 219, 255);
        internal static Color ForColor = Color.FromArgb(21, 66, 139);
        internal static Color PanelColor = Color.FromArgb(233, 240, 245);
        internal static Color PanelColorBack = Color.FromArgb(226, 236, 248);
    }

    internal delegate void CPopupEventHandler(object sender);

    internal class MoveForm
    {
        Control m_Ctl;
        Point m_Offset;
        Form m_Frm;

        public MoveForm()
        {
            
        }

        public void AddControl(Control m_Control, Form m_Form)
        {
            this.m_Ctl = m_Control;
            this.m_Frm = m_Form;
            m_Ctl.MouseDown += new MouseEventHandler(m_Ctl_MouseDown);
            m_Ctl.MouseMove += new MouseEventHandler(m_Ctl_MouseMove);
        }

        void m_Ctl_MouseMove(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left || e.Button == MouseButtons.Right)
            {
                m_Frm.Left += e.X - m_Offset.X;

                m_Frm.Top += e.Y - m_Offset.Y;

            }
        }

        void m_Ctl_MouseDown(object sender, MouseEventArgs e)
        {
            m_Offset = new Point(e.X, e.Y);
        }
    }

}
